<?php
class IndexController extends BaseController
{
    public function __construct($uri)
    {
        parent::__construct($uri);
    }

    private function index()
    {
        $this->output['tpl'] = 'index';
        return $this->output;
    }

    public function route()
    {
        if(1 === preg_match('/^\/$/', $this->uri)) {
            switch($this->http_method) {
                case 'get' :
                    return $this->index();
                    break;
            }
        }
        
        throw new ControllerException();
    }
}
?>
